package org.demo.db.meta;
/**
 * database table constraints info
 * @author  
 * @date    2010-9-6
 * @file    org.demo.db.meta.Constraint.java
 */
public class Constraint {
	// 约束名称
	private String name;
	// 约束类型 [Primary Key,Foreign Key,Unique,Check]
	private String type;
	// 约束 schema
	private String schema;
	// 约束表
	private String tableName;
	// 约束列
	private String columnName;
	// 引用 schema
	private String refSchema;
	// 引用表
	private String refTable;
	// 引用列
	private String refColumnName;
	// 删除规则
	private String delRule;
	
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getType() {
		return type;
	}
	public void setType(String type) {
		this.type = type;
	}
	public String getSchema() {
		return schema;
	}
	public void setSchema(String schema) {
		this.schema = schema;
	}
	public String getTableName() {
		return tableName;
	}
	public void setTableName(String tableName) {
		this.tableName = tableName;
	}
	public String getColumnName() {
		return columnName;
	}
	public void setColumnName(String columnName) {
		this.columnName = columnName;
	}
	public String getRefSchema() {
		return refSchema;
	}
	public void setRefSchema(String refSchema) {
		this.refSchema = refSchema;
	}
	public String getRefTable() {
		return refTable;
	}
	public void setRefTable(String refTable) {
		this.refTable = refTable;
	}
	public String getRefColumnName() {
		return refColumnName;
	}
	public void setRefColumnName(String refColumnName) {
		this.refColumnName = refColumnName;
	}
	public String getDelRule() {
		return delRule;
	}
	public void setDelRule(String delRule) {
		this.delRule = delRule;
	}
	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Constraint [name=").append(name);
		builder.append(", type=").append(type);
		builder.append(", schema=").append(schema);
		builder.append(", tableName=").append(tableName);
		builder.append(", columnName=").append(columnName);
		builder.append(", refSchema=").append(refSchema);
		builder.append(", refTable=").append(refTable);
		builder.append(", refColumnName=").append(refColumnName);
		builder.append(", delRule=").append(delRule);
		builder.append("]");
		return builder.toString();
	}
}
